<?php
namespace app\api\controller;
use think\Controller;
class User extends  Base
{
    public function initialize(){
        parent::initialize();
    }

    //用户 微信授权头像，昵称等信息更新
    public function userNick()
    {
        if (request()->isPost()) {
            $param = request()->param();
            $user= Controller('User', 'logic');
            $res = $user->userInfoUpdate($param);
            return $this->print_result($res);
        }
    }
    //用户 微信授权 手机号信息更新
    public function userPhone($input)
    {
          $user = Controller('User', 'logic');
          $res = $user->userPhoneUpdate($input);
          return $this->print_result($res);
    }
    //用户 是否审核通过 
    public function userIsPass($input)
    {
          $user= Controller('User', 'logic');
          $res = $user->isPass($input);
          return $this->print_result($res);
    }
    //用户 信息 
    public function userInfo($input)
    {
          $user = Controller('User', 'logic');
          $res = $user->userInfo($input);
          return $this->print_result($res);

    }


    public function editUserInfo($input)
    {
          $user = Controller('User', 'logic');
          $res = $user->editUserInfo($input);
          return $this->print_result($res);
    }

   // 课时日历
   public function calendar($input)
   {
          $user = Controller('User', 'logic');
          $res = $user->calendar($input);
          return $this->print_result($res);
   }

   // 课程列表
   public function dayCourse($input)
   {
          $user = Controller('User', 'logic');
          $res = $user->dayCourse($input);
          return $this->print_result($res);
   }

   // 成长记录列表
   public function growupList($input)
   {
          $user = Controller('User', 'logic');
          $res = $user->growupList($input);
          return $this->print_result($res);
   }

   // 成长记录详细
   public function growupInfo($input)
   {
          $user = Controller('User', 'logic');
          $res = $user->growupInfo($input);
          return $this->print_result($res);
   }

   // 学员风采列表
   public function studentStyle($input)
   {
          $user = Controller('User', 'logic');
          $res = $user->studentStyle($input);
          return $this->print_result($res);
   }

   // 学员风采详细
   public function studentStyleInfo($input)
   {
          $user = Controller('User', 'logic');
          $res = $user->studentStyleInfo($input);
          return $this->print_result($res);
   }

   // 我的课程
   public function myCourse($input)
   {
          $user = Controller('User', 'logic');
          $res = $user->myCourse($input);
          return $this->print_result($res);
   }

   // 请假
   public function  askForLeave($input)
   {
          $user = Controller('User', 'logic');
          $res = $user->askForLeave($input);
          return $this->print_result($res);
   }

   // 请假列表
   public function  askForLeaveList($input)
   {
          $user = Controller('User', 'logic');
          $res = $user->askForLeaveList($input);
          return $this->print_result($res);
   }

   // 补课申请
   public function  makeUpLessons($input)
   {
          $user = Controller('User', 'logic');
          $res = $user->makeUpLessons($input);
          return $this->print_result($res);
   }

   // 补课申请列表
   public function  makeUpLessonsList($input)
   {
          $user = Controller('User', 'logic');
          $res = $user->makeUpLessonsList($input);
          return $this->print_result($res);
   }
}
